<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>WMS-演示版</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="/style/basic_layout.css" rel="stylesheet" type="text/css">
    <link href="/style/common_style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/My97DatePicker/WdatePicker.js"></script>

    <script type="text/javascript" src="/js/commonAll.js"></script>
    <script>
        $(function () {
            $("input").prop("readOnly",true);
        })
</script>

</head>
<body>
<form id="editForm" action="/orderbill/saveOrUpdate.do" method="post">
    <input type="hidden" name="id" value="${entity.id}">
    <div id="container">
        <div id="nav_links">
            <span style="color: #1A5CC6;">订单</span>
            <div id="page_close">
                <a>
                    <img src="/images/common/page_close.png" width="20" height="20" style="vertical-align: text-top;"/>
                </a>
            </div>
        </div>
        <div class="ui_content">
            <table cellspacing="0" cellpadding="0" width="100%" align="left" border="0">
                <%--录入人--%>

                <tr>
                    <td class="ui_text_rt" width="140">订单编码</td>
                    <td class="ui_text_lt">
                        <input name="sn" value="${entity.sn}" class="ui_input_txt02 readonly" />
                    </td>
                </tr>
                <tr>
                    <td class="ui_text_rt" width="140">供应商</td>

                    <td>

                        <input value="${entity.supplier.name}" class="ui_input_txt02 readonly"/>
                    </td>
                </tr>


                <tr>
                    <td class="ui_text_rt" width="140">业务时间</td>
                    <td class="ui_text_lt">

                        <input name="vdate" value=" <fmt:formatDate value="${entity.vdate}"/>"
                               class="ui_input_txt02 readonly"/>
                    </td>
                </tr>
                <tr>
                    <td class="ui_text_rt" width="140">明细</td>
                </tr>
                <tr>
                    <td></td>
                    <td>

                        <table class="edit_table" cellspacing="0" cellpadding="0" border="0">
                            <thead>
                            <tr>
                                <th width="10"></th>
                                <th width="170">货品</th>
                                <th width="100">品牌</th>
                                <th width="80">价格</th>
                                <th width="80">数量</th>
                                <th width="100">金额小计</th>
                                <th width="180">备注</th>
                                <th width="120"></th>
                            </tr>
                            </thead>
                            <tbody id="edit_table_body">


                                    <c:forEach var="item" items="${entity.items}">
                                        <tr id="item">
                                            <td></td>
                                            <td>
                                                <input disabled readonly class="ui_input_txt01 readonly" tag="name" value="${item.product.name}"/>
                                                <img src="/images/common/search.png" class="searchproduct"/>
                                                <input type="hidden" tag="pid" value="${item.product.id}" class="readonly"/>
                                            </td>
                                            <td><span tag="brand">${item.product.brand.name}</span></td>
                                            <td><input type="number"  value="${item.costPrice}" class="ui_input_txt01 readonly"/>
                                            </td>
                                            <td><input type="number"  value="${item.number}" class="ui_input_txt01 readonly"/></td>
                                            <td><span tag="amount">${item.totalAmount}</span></td>
                                            <td><input tag="remark" class="ui_input_txt01 readonly" value="${item.remark}"/></td>
                                            <td>
                                                <a href="javascript:;" class="removeItem">删除明细</a>
                                            </td>
                                        </tr>
                                    </c:forEach>


                            </tbody>
                        </table>
                    </td>
                </tr>


                <tr>
                    <td>&nbsp;</td>
                    <td class="ui_text_lt">

                        &nbsp;<input id="back" type="button" value="返回" class="ui_input_btn01"/>
                    </td>
                        <script>
                            $("#back").click(function () {
                                location.href="/orderbill/list.do";
                            })
                        </script>
                </tr>
            </table>
        </div>
    </div>
</form>
</body>
</html>
